import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class NottravelReducer extends Reducer<NottravelFlowbean, LongWritable, NullWritable,NottravelFlowbean> {
    protected void reduce(NottravelFlowbean key, Iterable<LongWritable> values, Context context)
            throws IOException, InterruptedException {
        for (LongWritable value : values) {
            if (value.get()==1) {
                context.write(NullWritable.get(), key);
            }
        }
    }
}
